<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>midate-demo</title>
  <link rel="stylesheet" href="./css/font/iconfont.css">
  <link rel="stylesheet" href="./css/module/mi-date.css">
  <style>
    .Box {
      position: relative;
      margin: 0 auto;
      width: 80vw;
      height: 200px;
      background-color: #f8f8f8;
    }
    .Box2{
      position: absolute;
      width: 100%;
      height: 100%;
      z-index: 1;
      background: linear-gradient(to right, #fff, #822401);
      -webkit-mask: radial-gradient(circle at 10px 50%, red 9.5px, transparent 10px) 0 0/60px repeat-x,
  radial-gradient(circle at 30px 50%, red 9.5px, transparent 10px) 0 0/60px repeat-x,
  linear-gradient(to right, red 20px, transparent 0 ) 10px 50%/60px 20px repeat-x;
      display: flex;
      justify-content: space-around;
      align-items: center;
    }
    #mi-date-rq1{
      margin-top: 360px;
    }  
  </style>
</head>
<body>
  <!-- <div id="mi-date-rq" class="mi-date-box">
    <span class="iconfont icon-riqi"></span>
    <input class="mi-date-input" type="text" name="" id="rq">
  </div> -->
  <div style="width: 500px;">
    <input style="width:100%;" class="mi-date-input" type="text" name="" id="rq">
  </div>
  <input style="width: 300px;" class="mi-date-input" type="text" name="" id="rq1">
  <input id="a" type="text" style="ime-mode:disabled">
  <div class="Box">
    <div class="Box2">
    </div>
  </div>
  <!-- <div class="mi-tooltip">
    不在有效日期或时间范围内
  </div> -->
  <div style="background-color: red;position: relative;width: 200px;height: 30px;">
    <input style="position: absolute;width: 200px;height: 30px;background-color: transparent;left: 0;top:0;box-sizing: border-box;outline: none;z-index:2"/>
    <span class="iconfont icon-riqi" style="position: absolute;right:0;z-index: 1;top: 4px"></span>
  </div>
  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
  <script src="./mi-date.js"></script>
  <script>
    console.log("midate:",midate)
  var rq = midate.render({
      elem: '#rq'
      , type: 'date'
      , max: '2023-03-03'
      , value: null
      , clear: function(value, date) {
        console.log("clear事件：", value, date)
      }
      , now: function(value, date) {
        console.log("now事件：", value, date)
      }
      , done: function(value, date) {
        console.log("done事件：", value, date)
        console.log("rq1:",rq1)
        rq1.config.setMin(value+' '+'00:00:00')
        console.log("rq1:",rq1)
      }
    })
  var rq1 = midate.render({
      elem: '#rq1'
      , type: 'datetime'
      , change: function(value, date) {
        console.log("change事件2：", value, date)
      }
    })
    var kk = {hhh:666}
    var nn = 66
    $('#rq').val('2021-01-02');
    console.log(rq,rq1);
    // rq.config.max='2099-06-06';
    rq.config.setMax('2099-06-06');

    function cc() {
      aa = 100
  console.log(aa,bb)
}
 </script>
</body>
</html>